import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '采购ID',
    align:"center",
    dataIndex: 'id',
    resizable:true
  },
  {
    title: '创建人',
    align:"center",
    dataIndex: 'createBy',
    resizable:true
  },
  
  {
    title: '关联工厂',
    align:"center",
    dataIndex: 'factoryId_dictText',
    resizable:true
  },
  {
    title: '供应商',
    align:"center",
    dataIndex: 'packagingSupplierId_dictText',
    resizable:true
  },
  {
    title: '包材',
    align:"center",
    dataIndex: 'packagingId_dictText',
    resizable:true
  },
  {
    title: '采购数',
    align:"center",
    dataIndex: 'arrivalNum',
    resizable:true
  },
  {
    title: '未到货数量',
    align:"center",
    dataIndex: 'remainingNum',
    resizable:true
  },
  {
    title: '单位',
    align:"center",
    dataIndex: 'unit',
    resizable:true
  },
  {
    title: '状态',
    align:"center",
    dataIndex: 'status_dictText',
    resizable:true
  },
  {
    title: '备注',
    align:"center",
    dataIndex: 'remark',
    resizable:true
  },
  {
    title: '创建日期',
    align:"center",
    dataIndex: 'createTime',
    resizable:true
  },
];

//子表列表数据
export const packagingOrderDetailsColumns: BasicColumn[] = [
  {
    title: '主订单id',
    align:"center",
    dataIndex: 'packagingOrderId',
    resizable:true,
  },
  {
    title: '包材',
    align:"center",
    dataIndex: 'packagingId_dictText',
    resizable:true
  },
  {
    title: '到货数量',
    align:"center",
    dataIndex: 'num',
    resizable:true
  },
  {
    title: '单位',
    align:"center",
    dataIndex: 'unit',
    resizable:true
  },
  {
    title: '创建日期',
    align:"center",
    dataIndex: 'createTime',
    resizable:true
  },
   
];

// 高级查询数据
export const superQuerySchema = {
  createBy: {title: '创建人',order: 0,view: 'text', type: 'string',},
  createTime: {title: '创建日期',order: 1,view: 'datetime', type: 'string',},
  factoryId: {title: '关联工厂',order: 2,view: 'text', type: 'string',},
  packagingSupplierId: {title: '供应商',order: 3,view: 'sel_search', type: 'string',dictTable: "p_packaging_supplier", dictCode: 'id', dictText: 'name',},
  arrivalNum: {title: '采购数',order: 4,view: 'number', type: 'number',},
  status: {title: '状态',order: 5,view: 'number', type: 'number',dictCode: 'supper_order_status',},
  remark: {title: '备注',order: 6,view: 'text', type: 'string',},
  packagingId: {title: '包材',order: 7,view: 'sel_search', type: 'string',dictTable: "p_packaging", dictCode: 'id', dictText: 'name',},
};
